<p>不要捕捉 <code>IllegalMonitorStateException</code>。</p>
根据Oracle Javadoc的描述：
<blockquote>
  <code>IllegalMonitorStateException</code> is thrown when a thread has attempted to wait on an object's monitor or to notify other threads waiting on an object's monitor without owning the specified monitor.
</blockquote>

<p>当线程试图调用对象锁的wait或notify方法时，如果该线程不是这些对象锁的持有者则会抛出<code>IllegalMonitorStateException</code>。这通常是因为程序设计不合理导致的。</p>
<h2>不规范代码样例</h2>
<pre>
public void doSomething(){
  ...
  try {
    ...
    anObject.notify();
    ...
  } catch(IllegalMonitorStateException e) {  // 不合规
    ...
  }
}
</pre>

<h2>规范的代码样例</h2>
<pre>
public void doSomething(){
  ...
  synchronized(anObject) {
    ...
    anObject.notify();
    ...
  }
}
</pre>

